package com.itheima.task;

import com.alibaba.excel.EasyExcel;
import com.itheima.Emp;

import java.util.ArrayList;
import java.util.List;

public class ExcelWriteDemo {
    public static void main(String[] args) {

        List<Emp> empList = new ArrayList<>();

        empList.add(new Emp(1, "Tom1", 10, "男", "测试数据111"));
        empList.add(new Emp(2, "Tom2", 11, "男", "测试数据222"));
        empList.add(new Emp(3, "Tom3", 12, "男", "测试数据333"));
        empList.add(new Emp(4, "Tom4", 13, "男", "测试数据444"));
        empList.add(new Emp(5, "Tom5", 14, "男", "测试数据555"));
        empList.add(new Emp(6, "Tom6", 15, "男", "测试数据666"));

        EasyExcel.write("E:\\_374_项目1\\day08\\资料\\3.xls",
                Emp.class)
                .sheet("TestSheet")
                .doWrite(empList);
    }

}